package com.example.sms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sms.entity.Course;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    List<Course> getCoursesByTeacherId(Integer teacherId);

    Object addCourse(Course course);

    Integer addInfoToTeacherCourse(Integer id, Integer teacherId);
    @Delete("delete from teacher_course where cid = #{id}")
    Integer deleteInfoInTeacherCourse(Integer id);

    Boolean checkTeacherCourse(Integer teacherId, Integer courseId);

    Integer addToTeacherCourse(Integer courseId, Integer teacherId);

    boolean checkTeacherStudent(Integer teacherId, Integer studentId);
}
